package com.huawei.appmarket.framework.widget.uxwidget.hwdotspageindicator;

import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import o.dks;
import o.Logger;

class HwTopBannerIndicator$2 implements OnAttachStateChangeListener {
    final /* synthetic */ HwTopBannerIndicator ˎ;

    HwTopBannerIndicator$2(HwTopBannerIndicator hwTopBannerIndicator) {
        this.ˎ = hwTopBannerIndicator;
    }

    public void onViewAttachedToWindow(View view) {
        dks.ˊ().ˊ(this.ˎ);
        if (HwTopBannerIndicator.ˎ(this.ˎ) != null && HwTopBannerIndicator.ˎ(this.ˎ).ˎ() != null) {
            HwTopBannerIndicator.ॱ(this.ˎ, true);
            if (HwTopBannerIndicator.ʼ(this.ˎ) > 0.0f) {
                this.ˎ.ˋ();
            } else {
                this.ˎ.ॱ();
            }
        }
    }

    public void onViewDetachedFromWindow(View view) {
        dks.ˊ().ˎ(this.ˎ);
        if (HwTopBannerIndicator.ˎ(this.ˎ) == null || HwTopBannerIndicator.ˎ(this.ˎ).ˎ() == null) {
            Logger.ˏ("TAG", "viewpager is null !");
            return;
        }
        HwTopBannerIndicator.ˎ(this.ˎ).setCurrentItem(HwTopBannerIndicator.ˎ(this.ˎ).ˋ());
        HwTopBannerIndicator.ॱ(this.ˎ, false);
        if (HwTopBannerIndicator.ʼ(this.ˎ) > 0.0f) {
            this.ˎ.ॱ();
        }
    }
}
